//
//  FourthViewController.m
//  WisdomZhuHai
//
//  Created by yewei on 13-8-21.
//  Copyright (c) 2013年 wyd. All rights reserved.
//  工具页面

#import "FourthViewController.h"
#import "Common.h"
#import "UIImageView+WebCache.h"
#import <QuartzCore/QuartzCore.h>
#import "ToolsViewController.h"
#import "TransforController.h"
#import "MobClick.h"


@interface FourthViewController ()

@property (nonatomic, retain) ToolsViewController *toolsViewController;

@end

@implementation FourthViewController

- (id)init
{
    self = [super init];
    if(self)
    {
        self.tabBarItem.image = [UIImage imageNamed:@"Information/工具2.png"];
        self.tabBarItem.selectedImage = [UIImage imageNamed:@"Information/工具1.png"];
        self.title = @"助手";
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [Common colorWithRGB:0xdbdcdc];
    self.toolsViewController = [TransforController sharedInstanceOfToolsViewController];
//    self.toolsViewController = [[ToolsViewController alloc] initWithFrame:self.view.bounds];
    [self.toolsViewController setFrame:self.view.bounds];
    self.toolsViewController.navigationCtrl = self.navigationController;
    [self.view addSubview:self.toolsViewController.view];
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//#pragma mark - HttpRequestDelegate
//- (void)requestDidFinish:(ASIHTTPRequest*)request
//{
//    if (request.didUseCachedResponse) {
//        NSLog(@"use cache");
//    }
//    [[CustomLoadingView shareInstance] stopLoadingView];
//    NSString* title = [request.userInfo objectForKey:@"title"];
//    PublicbikeViewController *publicbikeCtrl = [[PublicbikeViewController alloc] initWithFrame:self.view.bounds];
//    publicbikeCtrl.navigationItem.title = title;
//    NSString *responseString = [[NSString alloc] initWithData:request.responseData encoding:NSUTF8StringEncoding];
//    publicbikeCtrl.dataDic = [[JsonDataManager shareInstance] getPublicBikeDicByJsonString:responseString];
//    [self.navigationController pushViewController:publicbikeCtrl animated:YES];
//    [responseString release];
//}
//
//- (void)requestDidFail:(ASIHTTPRequest*)request
//{
//    [[CustomLoadingView shareInstance] stopLoadingView];
//    [[CustomStatueBar shareInstance] showStatusMessage:NSLocalizedString(@"PlaceGetDataFail", nil)];
//}
//
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [MobClick beginLogPageView:@"tools"];
}
- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [MobClick endLogPageView:@"tools"];
}
@end
